﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Books.Models
{
    /// <summary>
    /// 借阅记录类
    /// </summary>
    public class BorrowRecord
    {
        /// <summary>
        /// 借阅记录ID，主键，自动增长
        /// </summary>
        public int RecordID { get; set; }

        /// <summary>
        /// 用户ID，外键，关联读者
        /// </summary>
        public int UserID { get; set; }

        public User user { get; set; }
        public Book book { get; set; }

        /// <summary>
        /// 图书ID，外键，关联图书
        /// </summary>
        public int BookID { get; set; }

        /// <summary>
        /// 借阅时间
        /// </summary>
        public DateTime BorrowDate { get; set; }

        /// <summary>
        /// 最迟归还时间
        /// </summary>
        public DateTime DueDate { get; set; }

        /// <summary>
        /// 归还时间，如果尚未归还，则为NULL
        /// </summary>
        public DateTime? ReturnDate { get; set; }

        /// <summary>
        /// 是否续借
        /// </summary>
        public bool IsRenewed { get; set; }
    }
}
